<template>
  <a-drawer
    width="35%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32" style="width: 80%; margin-left: 10%">
          <a-col :lg="12" :md="12" :sm="12">
            <a-form-model-item label="所属类型" prop="typeId">
              <select-dept v-model="form.typeId" select-model="single" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="文件名称" prop="docName">
              <a-input v-model="form.docName" placeholder="请输入文件名称" />
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="上传文件模版" prop="docUrl">
              <file-upload
                :fileList="fileList"
                @afterUpload="uploadCompleteFile"
                @removeFile="handlerRemoveFile"
              ></file-upload>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizDocModelEditForm from "./BizDocModelForm";
export default {
  ...BizDocModelEditForm,
};
</script>
